package cn.hdu.liang.holding;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;

public class Exam14 {

    public static void main(String[] args) {

        LinkedList<Integer> integers = new LinkedList<>();
        List<Integer> intList = Arrays.asList(1, 2, 3, 4, 5);

        ListIterator<Integer> it = intList.listIterator();
        while(it.hasNext()) {
            integers.add(integers.size() / 2, it.next());
            System.out.println(integers);
        }
    }

}
